package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 参保记录备份表
 *
 * @author zhiyuan
 * @since 2023-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edut_social_security")
@Schema(name = "EdutSocialSecurity", title = "参保记录备份表", description = "参保记录备份表实体类")
public class EdutSocialSecurity extends Model<EdutSocialSecurity> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "socialSecurityId", description = "社保id")
    @TableId(value = "social_security_id", type = IdType.ASSIGN_ID)
    private String socialSecurityId;

    @Schema(name = "taskDetailId", description = "任务详情id")
    @TableField(value = "task_detail_id")
    private String taskDetailId;

    @Schema(name = "aac001", description = "个人编号")
    @TableField(value = "aac001")
    private String aac001;

    @Schema(name = "aac002", description = "社会保障号")
    @TableField(value = "aac002")
    private String aac002;

    @Schema(name = "aab001", description = "单位编号")
    @TableField(value = "aab001")
    private String aab001;

    @Schema(name = "bab010", description = "统一社会信用代码")
    @TableField(value = "bab010")
    private String bab010;

    @Schema(name = "aab004", description = "单位名称")
    @TableField(value = "aab004")
    private String aab004;

    @Schema(name = "baz159", description = "参保关系id")
    @TableField(value = "baz159")
    private String baz159;

    @Schema(name = "aac003", description = "姓名")
    @TableField(value = "aac003")
    private String aac003;

    @Schema(name = "aac147", description = "证件号码")
    @TableField(value = "aac147")
    private String aac147;

    @Schema(name = "aac058", description = "证件类型")
    @TableField(value = "aac058")
    private String aac058;

    @Schema(name = "aae140", description = "险种")
    @TableField(value = "aae140")
    private String aae140;

    @Schema(name = "aac008", description = "参保状态")
    @TableField(value = "aac008")
    private String aac008;

    @Schema(name = "aac031", description = "个人缴费状态")
    @TableField(value = "aac031")
    private String aac031;

    @Schema(name = "aae030", description = "开始日期")
    @TableField(value = "aae030")
    private String aae030;

    @Schema(name = "aae031", description = "终止日期")
    @TableField(value = "aae031")
    private String aae031;

    @Schema(name = "dscCity", description = "所属地市")
    @TableField(value = "dsc_city")
    private String dscCity;

    @Schema(name = "aab301", description = "行政区划代码")
    @TableField(value = "aab301")
    private String aab301;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "sourceType", description = "数据来源：1 大数据获取 2管理员录入 3 学校录入")
    @TableField(value = "source_type")
    private String sourceType;

    @Schema(name = "continuityFlag", description = "是否连续缴纳")
    @TableField(value = "continuity_flag")
    private String continuityFlag;

    @Schema(name = "total", description = "累计缴费月数")
    @TableField(value = "total")
    private Integer total;
    @Schema(name = "totalBc", title = "本单位累计缴费月数")
    @TableField(value = "total_bc")
    private Integer totalBc;
    @Schema(name = "totalBclx", title = "本单位连续缴费月数")
    @TableField(value = "total_bclx")
    private Integer totalBclx;
    @Schema(name = "totalFlag", description = "是否获取累计缴费月数 0 未获取 1获取成功 2获取失败")
    @TableField(value = "total_flag")
    private String totalFlag;

    @Schema(name = "totalTime", description = "最新累计缴费月数获取时间")
    @TableField(value = "total_time")
    private Date totalTime;

    @Schema(name = "totalRemarks", description = "累计缴费月数获取备注")
    @TableField(value = "total_remarks")
    private String totalRemarks;

    @Schema(name = "totalErrorCnt", description = "累计缴费月数获取失败次数")
    @TableField(value = "total_error_cnt")
    private Integer totalErrorCnt;

    @Schema(name = "materials", description = "佐证材料")
    @TableField(value = "materials")
    private String materials;

    @Schema(name = "del", description = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "cleanFlag", description = "是否销毁 1是 0 否")
    @TableField(value = "clean_flag")
    private String cleanFlag;

    @Override
    public Serializable pkVal() {
        return this.socialSecurityId;
    }
}
